package com.dongdongshop.Service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.dongdongshop.mapper.TbSellerMapper;
import com.dongdongshop.pojo.TbSeller;
import com.dongdongshop.service.SellerService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
@org.springframework.stereotype.Service
public class SellerServiceImpl implements SellerService {
    
    @Autowired
    private TbSellerMapper tbSellerMapper;

    @Override
    public List<TbSeller> sellerList(TbSeller tbSeller) {
        return tbSellerMapper.sellerList(tbSeller);
    }

    @Override
    public TbSeller getMessage(String sellerId) {

        return tbSellerMapper.selectBySellerId(sellerId);
    }

    @Override
    public Integer update(TbSeller tbSeller) {
        return tbSellerMapper.updateByPrimaryKeySelective(tbSeller);
    }

    @Override
    public Integer register(TbSeller tbSeller) {
        return tbSellerMapper.insert(tbSeller);
    }

    @Override
    public TbSeller getName(String username) {
        return tbSellerMapper.getName(username);
    }
}
